#include <stdio.h>

int removeElement(int* nums, int numsSize, int val)
{
    int start = 0;
    for(int i = 0;i < numsSize;i++)
    {
        if(nums[i] != val)
        {
            nums[start++] = nums[i];
        }
       
    }
    return start;
}

int main()
{
    int nums[] = {1,2,3,3,2};
    int numsSize = sizeof(nums)/sizeof(nums[0]);
    int val = 3;
    int x = removeElement(nums, numsSize,val);
    for(int i = 0;i < x;i++)
        printf("%d  ",nums[i]);
    printf("\n%d\n",x);
    return 0;
}